package com.self.eduservice.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class ExcelListener extends AnalysisEventListener<ReadData> {

    //一行一行的读取Excel内容,其中data就是一行数据
    @Override
    public void invoke(ReadData data, AnalysisContext analysisContext) {
        System.out.println("***" + data);
    }

    //读取表头的方法
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头:" + headMap);
    }

    //读取完成后做什么事情？？
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
    }
}
